1. Technical Field
The present disclosure relates to an image encoding method and an image encoding apparatus.
2. Description of the Related Art
In conventional image encoding schemes represented by an ITU-T standard called H.26x and an ISO/IEC standard called MPEG-x, in order to operate an encoder and a decoder synchronously, a provision of conformance (conformance to standards) is defined as a framework to secure compatibility of the encoder and the decoder (refer to P.214 to P.226 of Non-Patent Literature 2).
Also, a concept of a Hypothetical Reference Decoder (HRD) that hypothetically models buffer management of the decoder is introduced. By using HRD, a failure of the decoder may be prevented, such as underflow, which is image data being not contained in the buffer with decoding timing, and overflow, which is image data coming in exceeding a prepared buffer size.
Specifically, a Hypothetical Stream Scheduler (HSS) manages input of a bitstream to a Coded Picture Buffer (CPB) of HRD. Input methods include two bit rate types, a constant bit rate and a variable bit rate.
In a case of the constant bit rate, the bitstream is always input into CPB of HRD at a fixed bit rate. In a case of encoding an image at the constant bit rate, it is necessary to check both underflow and overflow.
In a case of the variable bit rate, the bit rate at which the bitstream is input into CPB of HRD is variable. Accordingly, since input of the bitstream may be suspended if there is no empty space in a CPB capacity of HRD, overflow does not occur. Therefore, in a case of encoding at the variable bit rate, it is necessary to check only underflow.